import requests
import uncurl


class __jiake_query__():
    def __tongji__(self):
        curl_command = '''
        curl 'http://10.10.80.215:9089/eServer/centralFault/getJkReport' \
  -H 'Accept: application/json' \
  -H 'Accept-Language: en-US,en;q=0.9' \
  -H 'Cache-Control: no-cache' \
  -H 'Connection: keep-alive' \
  -H 'Content-Type: application/json;charset=UTF-8' \
  -H 'Origin: http://10.10.80.215:9089' \
  -H 'Pragma: no-cache' \
  -H 'Referer: http://10.10.80.215:9089/statisticalQuery/householdStatistical' \
  -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36' \
  -H 'combine-token: f82ff12d-db70-42b5-9f1a-2144e2b76bbf,a35d99c1-94b1-4e18-97cf-074e554b5513' \
  --data-raw '{"page":1,"size":10,"beginTime":"","endTime":"","alarmState":"","regionList":[]}' \
  --insecure
      '''

        req = uncurl.parse_context(curl_command)

        response = requests.request(
            method=req.method,
            url=req.url,
            headers=req.headers,
            data=req.data,
            verify=False
        )

        print(response.json())
